<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
		<script src="index.js?a=1"></script>
</head>
<body>

</body>
<script>
	const p1 = new Promise(resolve=>{
		setTimeout(()=>{
			resolve(100);
		},300)
	})
	const p2 = new Promise(resolve=>{
		setTimeout(()=>{
			resolve(200);
		},1000)
	})
	const p3 = new Promise((resolve,reject)=>{
		setTimeout(()=>{
			reject(300);
		},200)
	})
	const p4 = new Promise(resolve=>{
		setTimeout(()=>{
			resolve(400);
		},500)
	})
	const p = Promise.race([p1,p2,p3,p4]);
	console.log(p);
</script>
</html>